//const Scaffold({
//
//Key key,
//
//this.appBar,//标题栏
//
//this.body,//内容
//
//this.floatingActionButton,//悬浮按钮
//
//this.persistentFooterButtons,//多状态按钮
//
//this.drawer,//抽屉菜单
//
//this.endDrawer,//右侧抽屉菜单
//
//this.bottomNavigationBar,//底部导航栏
//
//this.backgroundColor,//背景颜色
//
//this.resizeToAvoidBottomPadding: true,
//
//this.primary: true,
//
//})

import 'package:flutter/material.dart';

class MyScaffoldDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text(
          '脚手架',
          style: TextStyle(color: Colors.redAccent),
        ),
      ),
      body: Text('脚手架'),
      floatingActionButton: FloatingActionButton(
        // 添加一个 浮点按钮
        onPressed: _doSomething,
        child: Text(
          '点击欧文',
          textAlign: TextAlign.center,
        ),
        backgroundColor: Colors.blue,
      ),
      drawer: new Drawer(
        child: Center(
          child: Text(
            '我是菜单',
            style: TextStyle(color: Colors.white),
          ),
        ),
      ),
      endDrawer: new Drawer(
        child: Scaffold(
          backgroundColor: Colors.red,
          body: Text('我是右侧抽屉'),
        ),
      ),
    );
  }

  _doSomething() {
    print('test on press');
  }
}

//class MyApp extends StatelessWidget {
//  @override
//  Widget build(BuildContext context) {
//    // TODO: implement build
//    return MaterialApp(
//      title: 'Scaffold',
//      theme: ThemeData(primaryColor: Colors.amber),
//      home: new MyScaffoldDemo(),
//    );
//  }
//}

//void main() {
//  runApp(new MyApp());
//}
